package jnpf.model.page;

import lombok.Data;

/**
 * 分页信息类
 * 用于封装分页查询的基本参数信息
 */
@Data
public class MyPageInfo {
    /**
     * 总记录数
     */
    private Long total;

    /**
     * 当前页码，从1开始计数
     */
    private Long currentPage;

    /**
     * 每页显示记录数
     */
    private Long pageSize;

    /**
     * 是否全部查询
     */
    private Boolean isAll;

    public MyPageInfo(Long total, Long currentPage, Long pageSize, Boolean isAll) {
        this.total = total;
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.isAll = isAll;
    }

    public MyPageInfo(Long total) {
        this.total = total;
        this.currentPage = 1L;
        this.pageSize = total;
    }

    public MyPageInfo() {}
}
